import { http, request } from './index';
import type { HistoryItemType, HistoryResponse } from '@/types/history';

export const fetchHistory = (params?: {
  type?: HistoryItemType;
  page?: number;
  size?: number;
}) => request<HistoryResponse>(http.get('/v1/history', { params }));

